package com.zy.cat.entity.mall;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Index;
import javax.persistence.Table;


import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Entity
@Table(name = "zy_cat_goods_favorites_info", indexes = {
		@Index(name = "id", columnList = "id"),
		@Index(name = "type_id", columnList = "type_id"),
		@Index(name = "parity", columnList = "parity")})
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("9趣猫商品选品库实体类")
public class CatGoodsFavoritesInfo {
	
	@Id
	@Column(columnDefinition = "BIGINT(32) NOT NULL COMMENT '选品库ID'")
	@ApiModelProperty(value = "用户账号ID", example = "20101906")
	private long id;
	
	@Column(columnDefinition = "VARCHAR(32) NOT NULL COMMENT '选品库分类标题'")
	@ApiModelProperty(value = "选品库分类标题", example = "3元无门槛")
	private String title;
	
	@Column(name = "type_id",columnDefinition = "INT(10) NOT NULL COMMENT '选品库分类ID(0.今日推荐、1.静态banner男、2.静态banner-女、3.3元无门槛、4.15元购、5.限时抢购小库、6.限时抢购主库)'")
	@ApiModelProperty(value = "选品库分类ID(0.今日推荐、1.静态banner男、2.静态banner-女、3.3元无门槛、4.15元购、5.限时抢购小库、6.限时抢购主库)", example = "300")
	private int typeId;
	
	@Column(columnDefinition = "VARCHAR(30) NOT NULL  COMMENT '选品库分类名称'")
	@ApiModelProperty(value = "选品库分类名称", example = "精选")
	private String name;
	
	@Column(columnDefinition = "INT(2) DEFAULT '1' COMMENT '单双日显示(0.双日、1.单日)'")
	@ApiModelProperty(value = "单双日显示(0.双日、1.单日)", example = "2")
	private int parity;
	
	@Column(columnDefinition = "INT(2) DEFAULT '0' COMMENT '分类排序'")
	@ApiModelProperty(value = "分类排序", example = "2")
	private int sort;
	
	@Column(columnDefinition = "VARCHAR(20) NOT NULL  COMMENT '创建时间[9趣猫商品补贴红包实体类]'")
	@ApiModelProperty(value = "创建时间", example = "2019-02-22 12:56:56:666")
	private String ctime;
	
	@Column(columnDefinition = "VARCHAR(20) DEFAULT '-'  COMMENT '最后更改时间'")
	@ApiModelProperty(value = "最后更改时间", example = "2019-02-22 12:56:56:666")
	private String ltime;

	public CatGoodsFavoritesInfo(int typeId) {
		super();
		this.typeId = typeId;
	}
}
